<?php

use Illuminate\Routing\Router;
use App\Models\User;
use App\Models\AotuReply;
use App\Models\Guestbook;
use App\Models\PageTemplate;
use App\Models\Message;
use App\Models\Material;
use App\Models\Menu;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    $router->any('/materials/sync', 'MaterialController@sync');
    $router->get('/analysis/user', 'AnalysisController@user');
    $router->get('/analysis/article', 'AnalysisController@article');
    $router->get('/analysis/message', 'AnalysisController@message');
    $router->get('/users/totalCharts', 'UserController@getTotalCharts');

    $router->resource('users', UserController::class);
    $router->resource('menus', MenuController::class);
    $router->resource('autoReplys', AotuReplyController::class);
    $router->resource('guestbooks', GuestbookController::class);
    $router->resource('pageTemplates', PageTemplateController::class);
    $router->resource('materials', MaterialController::class);
    $router->resource('messages', MessageController::class);


});
